# encoding: utf-8

with open(r'D:\code\python\2010.txt','r') as fileReader:
    print fileReader.read()
#出现问题：Non-ASCII character '\xe6' in file，解决方法：添加'# encoding: utf-8'
with open(r'D:\code\python\2010.txt','r') as fileReader:
    for line in fileReader.readlines():
        print line
#打开文件显示乱码方法，更改记事本编码方式为utf-8
with open(r'D:\code\python2\test.txt','w') as fileWriter:
    fileWriter.write('test')

